package com.zzc.service.item.api;

import com.zzc.legou.item.entity.Category;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@RequestMapping("/category")
public interface CategoryApi {

    /**
     * 查询分类信息
     * @param category
     * @return
     */
    @ApiOperation(value="查询", notes="根据实体条件查询")
    @RequestMapping(value = "/list")
     List<Category> list(Category category);

    @ApiOperation(value="根据ids查询names", notes = "根据分类id查询名称列表")
    @GetMapping("/names")
     List<String> queryNameByIds(@RequestParam("ids") List<Long> ids);

    @ApiOperation(value="加载", notes="根据ID加载")
    @GetMapping("/edit/{id}")
   Category edis(@PathVariable(value = "id") Long id);

}
